<template>
  <div>
<input type="file" id="file" @change="inputChange($event)">
  </div>
</template>

<script>
import axios from 'axios'
export default {
  data() {
    return {}
  },
  methods: {
inputChange(event){
    let form = new FormData()
    let file = document.getElementById('file').files[0]

    form.append('multipartFile',file,file.name)
    axios({
        method:'post',
        url:'http://d299o16972.qicp.vip/pc/image/upload',
        data:form,
        headers:{
            'Content-Type':'multipart/form-data'
        }
    }).then(data=>{
        console.log('data',data)
    })
}
  },
  components: {

  }
}
</script>

<style>

</style>
